<template>
  <div>
    <el-button type="info" @click="logout">退出</el-button>
    <button @click="text">测试</button>
    <button @click="text2">测试2</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: {
        aa: "aa"
      }
    };
  },
  methods: {
    logout() {
      window.sessionStorage.clear();
      this.$router.push("/login");
    },
    text() {
      this.$http.get("/admin").then(res => {
        console.log(res);
      });
    },
    text2() {
      this.$http.get("/bb").then(res => {
        console.log(res);
      });
    }
  }
};
</script>

<style lang="less" scoped>
</style>